﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TempHumidityMonitor {
    public class AppConfig {
        public string PortName { get; set; } = "COM1";
        public int BaudRate { get; set; } = 115200;
        public int DataBits { get; set; } = 8;
        public string StopBits { get; set; } = "One";     // 注意是 string
        public string Parity { get; set; } = "None";      // 注意是 string
        public byte SlaveId { get; set; } = 1;

        // --- 新增的报警阈值 ---
        public float HighTemp { get; set; } = 30.0f;
        public float LowTemp { get; set; } = 10.0f;
        public float HighHumi { get; set; } = 80.0f;
        public float LowHumi { get; set; } = 30.0f;
    }
}